#ifndef SPRITE2_20180107
#define SPRITE2_20180107
#include "../picture/picturerender.h"
#include "../physical/physical.h"


class Sprite
{
private:
    Physical_Data* m_physical;
    PictureRender* m_pictureRender;

	GLfloat m_animationDelay;
    GLfloat m_animationElapsed;

    bool m_isCollideable;
    bool m_isVisible;
    bool m_isActive;

    int m_value;

public:
	Sprite();
	~Sprite();

public:
	Point getPosition(){return m_physical->point;}
	void setPosition(GLfloat x,GLfloat y)
	{
		m_physical->point.x = x;
		m_physical->point.y = y;
	}

	Size getSize(){return m_physical->size;}
	void setSize(GLfloat width,GLfloat height)
	{
	    m_physical->size.width = width;
	    m_physical->size.height = height;
    }

	GLfloat getVelocity(){return m_physical->velocity;}
	void setVelocity(GLfloat velocity){m_physical->velocity = velocity;}

	bool getActive(){return m_isActive;}
	void setActive(bool active){m_isActive = active;}

	bool getVisible(){return m_isVisible;}
	void setVisible(bool visible){m_isVisible = visible;}

	bool getCollideable(){return m_isCollideable;}
	void setCollideable(bool collideable){
		m_isCollideable = collideable;
	}

	int getValue(){return m_value;}
	void setValue(int value){m_value = value;}

	PictureRender* getPictureRender(){return m_pictureRender;}
	void setPictureRender(PictureRender* pictureRender){m_pictureRender = pictureRender;}

	JumpState getJumpState(){return m_physical->jumpState;}
	void setJumpState(JumpState state){m_physical->jumpState = state;}

public:
	void jump_UP();
	void jump_DOWN();

public:
	void update(float deltaTime);
	void render();
};


#endif
